﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>PROGRAMA IMPRIMIR VALORES</title>
<body>
<center><h2>IMPRIMIR PALABRA CLAVE</h2>
</body>
<script "type = text/javascript" languaje="javascript">
	var n1 = "";
	var contador;
	var b = "bonita";
	var z = 3;
	
	
	for (var i = 1; i<=3; i++)
	{
		n1= window.prompt ("Ingresa la palabra clave","")
	    if (n1.toLowerCase() == b) 
	   	{	
	     	contador= 1;
    		while (contador<=1000)
	   		 {
	    	//document.write("<p>" + n1 + "</p>");
	    	document.write(n1.toLowerCase() + " ");
	    	//contador=contador + 1;
	    	contador++;		
	         }
	     i = 3;
	   }
	if (n1.toLowerCase() !== b)
	    { 
	    z = z - 1;
		alert ("Tienes "+ z + " oportunidades mas");
		}
    }
	//window.promt ("No es correcto");							
</script>
</head>
</html>
